package com.bwie.common.remote.system;

import com.bwie.common.constants.ServerNameConstants;
import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author：ShenJiaFeng
 * @Package：com.bwie.common.remote.system
 * @Project：zg5_19
 * @name：RemoteUserService
 * @Date：2024/2/17 14:16
 */

//声明远程调用客户端连接
//    name指定了调用服务的名称
//    path指定了路径
@FeignClient(
        name = ServerNameConstants.SYSTEM_NAME,
        path = "/user"
)
public interface RemoteUserService {
    @PostMapping("/findByUserName")
    public Result<User> findByUserName(@RequestParam String userName);
}
